
from .api_mysql import ApiMysqlclass

from flask import Flask, request, Blueprint

from . import api_index

app = Flask(__name__)

@api_index.route('/index', methods=['GET', 'PUT'])
    
def index():
    
    methods = request.method

    info = request.args

    page = info.get('page')

    limit = info.get('limit')

    party = info.get('party')

    with ApiMysqlclass() as conn_api:

        result_info = conn_api.index(methods, page, limit, party)

    return result_info
    


if __name__ == '__main__':
    
    app.run(debug = True)
    